#include <stdio.h>
#include <time.h>
//时间戳


int addtoval(int from, int to)
{
    int ret =0;
    int i=from;
    while(i<=to)
    {
        ret+=i;
        i++;
    }
    return ret;
}

void Print(int sum)
{
    long long tmp = time(NULL);

    printf("sum=%d  time=%lld \n",sum,tmp);
}

int main()
{
    int sum = addtoval(0,100);
    Print(sum);

    return 0;
}
